package com.umakr.demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by yangliu on 2017/8/11.
 */
@RequestMapping("/day10")
@Controller
public class Controller10 {
    @RequestMapping("/test10")
    public ModelAndView show(){
        ModelAndView mav = new ModelAndView();
        mav.setViewName("day10/datagridcrud");
        return mav;
    }

    @RequestMapping("/test101")
    @ResponseBody
    public Object show2(String userName ,String userPassword){
        System.out.println(userName);
        Map<String,String> map = new HashMap<>();
        map.put("username",userName);
        map.put("userPassword",userPassword);
        String str =map.get("userPassword");
        System.out.println(str);
        return map;
    }


}
